< previous page page_864 next page >

Page 864
You need one other set of tools to meet the design criteriathe ability to edit scripts from within SQL-VB5. Instead of trying to create your own editor, we show you how you can include the Windows Notepad program as part of your Visual Basic project. This can be done with minimal effort, and it is a great way to take advantage of the software already available on users' desktops. This is perfectly legal as long as you do not provide users with a copy of the NOTEPAD.EXE program. Because all Windows systems have this program already, you're all set.
Creating the SQL-VB5 Forms
Note.gif
If you haven't already done so, start up Visual Basic 5.0 and prepare a new Standard EXE project.

The first thing you do is define the MDI form for the project. This form provides the interface to the Notepad editor for managing script files. It also enables users to run existing scripts to see the results. Because it is a multidocument interface, you need to add some menu options to enable users to arrange the forms within the workspace. Finally, you add access to an About box through the menu.
SQLVBMain Form
Add an MDI form to your project by selecting Project | Add MDI Form from the Visual Basic main menu. This form contains a few controls that allow the user to open an ASCII file to edit or run, arrange the various child forms open within the SQLVBMain MDI form, and show the About box upon request. Use Table A.2 and Figure A.2 as guides as you build the form.
Note.gif
In Table A.2, be sure to place the common dialog, label, and command button controls directly ''on" the picture controls. Visual Basic does not allow standard controls to be placed directly on an MDI form. You can, however, place Picture controls on an MDI form, and then place your standard controls on the Picture controls.

 
< previous page page_864 next page >

If you like this book, buy it!